package com.ruoyi.alipay.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Data
@Component
@ConfigurationProperties(prefix = "alipay")
public class AlipayConfig {
    // 应用ID,您的APPID，收款账号既是您的APPID对应支付宝账号
    private String appId;
    
    // 商户私钥，您的PKCS8格式RSA2私钥
    private String merchantPrivateKey;
    
    // 支付宝公钥
    private String alipayPublicKey;
    
    // 服务器异步通知页面路径
    private String notifyUrl;
    
    // 页面跳转同步通知页面路径
    private String returnUrl;
    
    // 签名方式
    private String signType = "RSA2";
    
    // 字符编码格式
    private String charset = "utf-8";
    
    // 支付宝网关，这里使用沙箱环境
//    private String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";
    private String gatewayUrl = "https://openapi-sandbox.dl.alipaydev.com/gateway.do";
}